<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<script type="text/javascript" src="/assets/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/assets/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="/assets/ueditor/lang/zh-cn/zh-cn.js"></script>
<div id="page-content-wrapper">

    <div id="page-title">
        <h3>
        	添加用户消息
        </h3>
    </div>

    <div class="pad10A">
    <form id="demo-form1" action="/personMessage/add" class="col-md-12" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="id" value="${message.id}"/>
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    导入接收人号码:
                </label>
            </div>
            <div class="form-input col-md-6">
                 <input type="file" name="file" value="导入">
            </div>
        </div>
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    接收人号码:
                </label>
            </div>
            <div class="form-input col-md-8">
                <textarea id="mobiles" name="mobiles" data-trigger="change"
                       class="parsley-validated"></textarea>
            </div>
        </div>
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    消息类别:
                </label>
            </div>
            <div class="form-input col-md-8">
                <select name="category">
                    <option value="普通消息">普通消息</option>
                    <option value="交易消息">交易消息</option>
                    <option value="红包消息">红包消息</option>
                    <option value="活动消息">活动消息</option>
                </select>
            </div>
        </div>
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    消息标题:
                    <span class="required">*</span>
                </label>
            </div>
            <div class="form-input col-md-8">
                <input type="text" id="title" name="title" data-trigger="change" data-required="true"
                       class="parsley-validated" value="${(message.title)?xhtml}">
            </div>
        </div>
		<div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    消息内容:
                    <span class="required">*</span>
                </label>
            </div>
            <div class="form-input col-md-8">
                <textarea id="content" name="content" data-trigger="change" data-required="true"
                       class="parsley-validated">${(message.content)?xhtml}</textarea>
            </div>
        </div>        
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    打开网页URL:
                </label>
            </div>
            <div class="form-input col-md-8">
                <input type="text" id="url" name="url" data-trigger="change"
                       class="parsley-validated" value="${(message.url)?xhtml}">
            </div>
        </div>
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    打开App:
                </label>
            </div>
            <div class="form-input col-md-8">
                <select name="openAppPage">
                    <option value="">选择打开App页面</option>
                    <option value="Home">首页</option>
                    <option value="Product">理财产品</option>
                    <option value="MyAsset">我的资产</option>
                    <option value="MyBonus">我的红包</option>
                    <option value="More">更多</option>
                    <option value="AboutHejia">关于快聚财</option>
                </select>
            </div>
        </div>
    </form>
    </div>

    <div class="divider"></div>
    <div class="form-row">
        <input type="hidden" name="superhidden" id="superhidden">

        <div class="form-input col-md-10 col-md-offset-2">
            <a href="javascript:;" class="btn medium primary-bg radius-all-4 col-md-2" id="demo-form-2-valid">
                提交
            </a>
        </div>
    </div>
</div>


<script>
    $(function () {
        $("#demo-form-2-valid").click(function () {
            $('#demo-form1').parsley('validate');
	    	$('#demo-form1').trigger('submit');
	    	return;
        });
    })
</script>